/*
 * CodeSaveCommand.java
 *
 * Created on 2006년 3월 29일 (수), 오후 4:11
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.qbooks.app.store;

import java.util.*;





import javax.servlet.*;
import javax.servlet.http.*;

import org.json.simple.JSONObject;

import com.zll.framework.model.HashBox;
import com.zll.framework.model.HashList;
import com.zll.framework.servlet.Command;
import com.zll.framework.util.StringUtil;
import com.qbooks.app.AppDAO;
import com.qbooks.common.CommonUtil;





/**
 *
 * @author eastar
 */
public class BookListCommand implements Command
{
	
    public String execute(HttpServletRequest  request, HttpServletResponse response)
    throws Exception
    {
    	AppDAO dao = new AppDAO();
    	

    	String os			= StringUtil.nvl(request.getAttribute("os"));
    	String categorCode 	= StringUtil.nvl(request.getParameter("category_code"));
    	String book_name	= StringUtil.toHan(request.getParameter("book_name"));
    	
    	HashMap infos = new HashMap();
    	infos.put("os", os);
    	infos.put("category_code", categorCode);
    	infos.put("book_name", book_name);


		if ("android".equals(os)) {
			
		}
		else if ("ios".equals(os)) {
			
		}

		request.setAttribute("bookList", dao.selectBookList(infos));

    	return "/app/store/bookList.jsp";
    }
}
